<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>锐信内容管理系统</title>
<%@include file="/WEB-INF/pages/common/taglibs.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}resources/css/reportTree.css" /> 
<link rel="stylesheet" type="text/css" href="${ctx}resources/css/list.css" /> 
<link rel="stylesheet" href="${ctx}resources/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="${ctx}resources/js/table.js"></script>
<script type="text/javascript" src="${ctx}resources/js/page.js"></script>
<script type="text/javascript" src="${ctx}resources/js/jquery.ztree.core-3.4.min.js"></script>
</head>
<style>
	.STYLE1 a {
	   text-decoration: none;
	   color: #ffffff;
	}
	.tbl_list a {
	  text-decoration: none;
	  color: #000000;
	}
	 a:hover {color: #0000FF;}
    .limit{ color:red;}
    .normol{ color:#3B6375;}
.ztree li span.button.pIcon01_ico_open{margin-right:2px; background: url(${ctx}resources/css/zTreeStyle/img/diy/1_open.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
.ztree li span.button.pIcon01_ico_close{margin-right:2px; background: url(${ctx}resources/css/zTreeStyle/img/diy/1_close.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
.ztree li span.button.pIcon02_ico_open, .ztree li span.button.pIcon02_ico_close{margin-right:2px; background: url(${ctx}resources/css/zTreeStyle/img/diy/2.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
.ztree li span.button.icon01_ico_docu{margin-right:2px; background: url(${ctx}resources/css/zTreeStyle/img/diy/3.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
.ztree li span.button.icon02_ico_docu{margin-right:2px; background: url(${ctx}resources/css/zTreeStyle/img/diy/4.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
.ztree li span.button.icon03_ico_docu{margin-right:2px; background: url(${ctx}resources/css/zTreeStyle/img/diy/5.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
.ztree li span.button.icon04_ico_docu{margin-right:2px; background: url(${ctx}resources/css/zTreeStyle/img/diy/6.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
.ztree li span.button.icon05_ico_docu{margin-right:2px; background: url(${ctx}resources/css/zTreeStyle/img/diy/7.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
.ztree li span.button.icon06_ico_docu{margin-right:2px; background: url(${ctx}resources/css/zTreeStyle/img/diy/8.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
	</style>
<SCRIPT type="text/javascript">
        var rid = 0;
		function initReportData(event, treeId, treeNode) {
			rid = treeNode.id-1;
			var url = "${ctx}report/reportData.htm?rid="+rid+"&pageNo=1"
			$('#reportData').attr("src",url);  
		};
		var setting = {
			data: {
				simpleData: {
					enable: true
				}
			},
			callback: {
				onClick: initReportData
			}
		};
		
		$(document).ready(function(){
			$.fn.zTree.init($("#treeDemo"), setting, ${reports});
		});
		
		function exportReport(){
			if(rid==0||rid==""){
				alert("请选择要导出的报表");
				return ;
			}
			window.open("${ctx}report/export.htm?rid="+rid);
		}
	</SCRIPT>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	
	  <tr>
	    <td height="30" colspan="2">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	          <tr>
	            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
	              <tr>
	                <td width="6%" height="19" valign="bottom"><div align="center"><img src="${ctx}resources/images/tb.gif" width="14" height="14" /></div></td>
	                <td width="94%" valign="bottom"><span class="STYLE1"> 报表基本信息列表</span></td>
	              </tr>
	            </table></td>
	            <td><div align="right"><span class="STYLE1">
	              <span style="cursor: pointer;"><input type="button" value="导出" onclick="exportReport()">&nbsp;</span><span class="STYLE1"> &nbsp;
	            </span></span> </div></td>
	          </tr>
	        </table></td>
	      </tr>
	    </table></td>
	  </tr>
	  <tr>
		  <td width="200" valign="top">
		  <!-- 报表列表 -->
		 <table width="100%" border="0" cellpadding="0" class="tbl_list"  cellspacing="1">
		      <tr  height="30px;">
		        <th bgcolor="d3eaef" class="STYLE6"><div align="left"><span >报表列表</span></div></th>
		      </tr>
			      <tr>
			        <td> <div class="zTreeDemoBackground left" style="padding-top: 0px;"><ul id="treeDemo" class="ztree" style="width: 100%;height: 100%"></ul></div></td>
			      </tr>
		    </table>
		  </td>
		    <td valign="top">
		    	<!-- 数据 -->
		    	<iframe id="reportData" style="width: 100%;height: 100%"></iframe>
		    </td>
	  	</tr>
</table>
</body>
</html>
